Skip to content

fix(compiler): emit SQLite-native date arithmetic instead of INTERVAL… - #236

Merged
mischuh merged 1 commit into
mainfrom
fix/sqlite-interval-date-trunc-emission
Jul 18, 2026
Merged

fix(compiler): emit SQLite-native date arithmetic instead of INTERVAL…#236
mischuh merged 1 commit into
mainfrom
fix/sqlite-interval-date-trunc-emission

Conversation

@mischuh

@mischuh mischuh commented Jul 18, 2026

Copy link
Copy Markdown
Owner

…/DATE_TRUNC

sqlglot's SQLite generator doesn't transpile the compiler's neutral INTERVAL-arithmetic and DATE_TRUNC nodes into real SQLite syntax, so rolling-window filters and time-bucketed dimensions produced SQL that SQLite rejects (no INTERVAL literal, no DATE_TRUNC function). The SQLite adapter now rewrites both into DATE(col, 'modifier') calls before emission.

…/DATE_TRUNC

sqlglot's SQLite generator doesn't transpile the compiler's neutral
INTERVAL-arithmetic and DATE_TRUNC nodes into real SQLite syntax, so
rolling-window filters and time-bucketed dimensions produced SQL that
SQLite rejects (no INTERVAL literal, no DATE_TRUNC function). The
SQLite adapter now rewrites both into DATE(col, 'modifier') calls
before emission.
@mischuh mischuh self-assigned this Jul 18, 2026
@mischuh
mischuh merged commit 661f4cd into main Jul 18, 2026
6 checks passed
@mischuh
mischuh deleted the fix/sqlite-interval-date-trunc-emission branch July 18, 2026 17:30
@mischuh mischuh mentioned this pull request Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant